﻿namespace CardDrawTest
{
    public static class Program
    {
        public static void Main()
        {
            var random = new RandomDraw();
            random.AddPrize("皮肤: 阿库玛-华夫巧厨", 0.50M);
            random.AddPrize("金币", 24.42M);
            random.AddPrize("其他皮肤", 5.57M);
            random.AddPrize("各类加成卡", 20.55M);
            random.AddPrize("小喇叭", 24.40M);
            random.AddPrize("宝箱钥匙", 24.56M);
            var map = new Dictionary<string, uint>();
            const uint MAX = 10000000;
            for (int i = 0; i < MAX; ++i)
            {
                var name = random.GetRandomResult();
                if (!map.TryAdd(name, 1))
                {
                    map[name] = map[name] + 1;
                }
            }
            foreach (var value in map)
            {
                Console.WriteLine($"{value.Key}={value.Value}, {((double)value.Value / MAX)*100}%");
            }
        }
    }
}
